<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ask-question.aspx.cs" Inherits="board_ask_question" MasterPageFile="~/MasterPage.master" ValidateRequest="false" Async="true"
    MaintainScrollPositionOnPostback="true" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>Call Center Employment | Teledirect</title>
    <meta name="Description" content="Teledirect has openings in Call Center Jobs In countries like Singapore, Malaysia, Thailand, Hong Kong and Indonesia."/>
    <meta name="keywords" content="Call Center Jobs,Call Center Employment,Inbound Call Center Jobs,Outsourcing Call Center Jobs,Outbound Call Center Jobs,Customer Call Center Jobs,Call Center Consultants,BPO Jobs In Asia"/>
    <link rel="image_src" href="/images/public/snapshot_careers.jpg" />
    <meta name="Author" content="Teledirect Authorship - Outsourcing" />
    <meta name="revisit-after" content="10 days" />
    <meta name="content-language" content="en" />
    <!-- Scripts  |  Start  -->
    
    <script type="text/javascript">
        $(document).ready(function() {
            $().UItoTop({ easingType: 'easeOutQuart' });
        });

        $("#op").css({ opacity: 0.5 });
    </script>

    <!-- Scripts  |  End    -->
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PageBody" runat="Server">
    <!-- Showcase Banner  |  Start -->
    <div id="showcase">
        <div id="canvas" class="contact">
            <!-- #Include file="../includes/showcase_nav.inc" -->
            <div class="grid z25">
            </div>
            <div class="q z20">
            </div>
            <div class="bg z15">
            </div>
            <div id="cloud_small" class="cloud_contact z15">
            </div>
        </div>
    </div>
    <!-- Showcase Banner  |  End   -->
    <div class="seperator">
    </div>
    <div id="body">
        <!-- Right Column | Start -->
        <div class="col_left">
            <div class="menu">
                <ul>
                    <li><a href="../board/list-question.aspx">Q&amp;A</a></li>
                    <li><a href="#" class="select">Ask a question</a></li>
                    <%--<li runat="server" id="liAnswer" style="display:none"><a href="../board/answer-question.aspx">Answer questions</a></li>--%>
                </ul>
            </div>
        </div>
        <!-- Right Column | End   -->
        <!-- Content Column | Start -->
        <div class="col_mid">
            <!-- Quick Nav [Prev / Next]  |  Start  -->
            <!-- Quick Nav [Prev / Next]  |  End    -->
            <h1 class="heading">
                <asp:Label runat="server" ID="lblFormTitle" Text="Ask a question" /></h1>
            <div class="seperator">
            </div>
            <div class="content_full_655">
                <div id="divAppForm">
                    <table width="100%" cellpadding="3" cellspacing="3">
                        <tr>
                            <td colspan="3">
                                <span style="display: none; color: Red; font-weight: bold; font-size: small">All fields
                                    are required.</span>
                                <asp:ValidationSummary runat="server" ID="vsApplyNow" ValidationGroup="applynow"
                                    ShowSummary="false" ShowMessageBox="true" HeaderText="Opps.., please complete all (*) field(s)." />
                            </td>
                        </tr>
                        <tr>
                            <td width="170px">
                                Subject
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox runat="server" ID="txtSubject" MaxLength="1000" Width="500px" />
                                <asp:RequiredFieldValidator runat="server" ID="rfvSubject" ControlToValidate="txtSubject"
                                    ValidationGroup="applynow" Display="Dynamic" ErrorMessage="Please enter a subject."
                                    Text="*" />
                            </td>
                        </tr>
                        <tr>
                            <td width="170px">
                                Question
                            </td>
                            <td>
                                :
                            </td>
                            <td id="tdQuestion" runat="server">
                                
                                <asp:TextBox runat="server" ID="txtQuestion" MaxLength="4000" TextMode="MultiLine" 
                                    Width="500px" Height="80px"></asp:TextBox>
                                
                                <%--<asp:HtmlEditorExtender ID="txtEditorQuestion" runat="server" 
                                    TargetControlID="txtQuestion">
                                <Toolbar>
                                <asp:Bold />
                                <asp:Italic />
                                <asp:Underline />
                                <asp:StrikeThrough />
                                <asp:Copy />
                                <asp:Cut />
                                <asp:Paste />
                                <asp:Delete />
                                <asp:FontNameSelector />
                                <asp:FontSizeSelector />
                                <asp:ForeColorSelector />
                                <asp:HorizontalSeparator />
                                <asp:Indent />
                                <asp:Outdent />
                                <asp:InsertHorizontalRule />
                                <asp:InsertOrderedList />
                                <asp:InsertUnorderedList />
                                <asp:JustifyCenter />
                                <asp:JustifyFull />
                                <asp:JustifyLeft />
                                <asp:JustifyRight />
                                <asp:RemoveFormat />
                                <asp:Superscript />
                                <asp:Subscript />
                                <asp:Redo />
                                <asp:Undo />
                                <asp:CreateLink />
                                <asp:UnLink />
                                <asp:SelectAll />
                                <asp:UnSelect />
                                </Toolbar>
                                </asp:HtmlEditorExtender>--%>
      
                                <asp:RequiredFieldValidator runat="server" ID="rfvQuestion" ControlToValidate="txtQuestion"
                                    ValidationGroup="applynow" Display="Dynamic" ErrorMessage="Please enter a question."
                                    Text="*" />
                                
                            </td>
                        </tr>
                        <tr>
                            <td width="170px">
                                Name
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlTitle" runat="server">
                                    <asp:ListItem Text="Select ..." Value="-1"></asp:ListItem>
                                    <asp:ListItem Text="Mr." Value="MR"></asp:ListItem>
                                    <asp:ListItem Text="Mrs." Value="MRS"></asp:ListItem>
                                    <asp:ListItem Text="Ms." Value="MS"></asp:ListItem>
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator runat="server" ID="rfvTitle" ControlToValidate="ddlTitle"
                                    ValidationGroup="applynow" Display="Dynamic" ErrorMessage="Please select title."
                                    Text="*" InitialValue="-1" />
                                <asp:TextBox runat="server" ID="txtFullName" MaxLength="120" Width="169px" />
                                <asp:RequiredFieldValidator runat="server" ID="rfvFullName" ControlToValidate="txtFullName"
                                    ValidationGroup="applynow" Display="Dynamic" ErrorMessage="Please enter your name."
                                    Text="*" />
                                <asp:RegularExpressionValidator ID="revFullName" runat="server" ValidationGroup="applynow"
                                    ValidationExpression="^[a-zA-Z''-'\s]{2,120}$" ControlToValidate="txtFullName"
                                    Text="**" ErrorMessage="Invalid character(s) in full name." Display="Dynamic"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td width="170px">
                                Contact Number
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox runat="server" ID="txtContactNumber" MaxLength="50" Width="250px" />
                                <asp:RequiredFieldValidator runat="server" ID="rfvContactNumber" ControlToValidate="txtContactNumber"
                                    ValidationGroup="applynow" Display="Dynamic" ErrorMessage="Please enter contact (mobile, office, home) number."
                                    Text="*" />
                                <asp:RegularExpressionValidator ID="revContactNumber" runat="server" ValidationGroup="applynow"
                                    ValidationExpression="^[0-9-+' ']{5,20}$" ControlToValidate="txtContactNumber"
                                    Text="**" ErrorMessage="Invalid character(s) in contact number." Display="Dynamic"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td width="170px">
                                Email
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox runat="server" ID="txtEmailAddress" MaxLength="255" Width="250px" />
                                <asp:RequiredFieldValidator runat="server" ID="rfvEmailAddress" ControlToValidate="txtEmailAddress"
                                    ValidationGroup="applynow" Display="Dynamic" ErrorMessage="Please enter email address."
                                    Text="*" />
                                <asp:RegularExpressionValidator ID="revEmailAddress" runat="server" ValidationGroup="applynow"
                                    Text="**" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                                    ControlToValidate="txtEmailAddress" ErrorMessage="Invalid email address format."
                                    Display="Dynamic"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td width="170px">
                                Security Check
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:Image ID="hplCaptcha" runat="server" ImageUrl="~/captcha/Handler.ashx" AlternateText="Captcha" />
                                <br />
                                Please type as shown on image above:<br />
                                <asp:TextBox Width="220px" ID="txtSecurityCheck" MaxLength="10" runat="server" />
                                <asp:HiddenField ID="hidSecurityCheck" Visible="false" runat="server" />
                                <asp:RequiredFieldValidator ID="rfvSecurityCheck" ValidationGroup="applynow" ControlToValidate="txtSecurityCheck"
                                    runat="server" Display="Dynamic" Text="*" ErrorMessage="Please enter security check code."></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="revSecurityCheck" runat="server" ValidationGroup="applynow"
                                    ValidationExpression="^\s*([^\s]\s*){4}$" ControlToValidate="txtSecurityCheck"
                                    Text="**" ErrorMessage="Please type 4 characters for security check code." Display="Dynamic"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td width="170px">
                            </td>
                            <td>
                            </td>
                            <td>
                                <div id="divProcessing" style="display: none;">
                                    <asp:Label runat="server" ID="lblSubmitMessage" ForeColor="Red" />
                                </div>
                                <asp:Button runat="server" ID="btnSubmitForm" OnClientClick="javascript:return SubmitConfirm();"
                                    OnClick="btnSubmitForm_Click" CausesValidation="true" ValidationGroup="applynow"
                                    Text="Submit" Width="120px" Height="35px" Font-Bold="true" />
                            </td>
                        </tr>
                    </table>
                </div>
                <asp:Label runat="server" ID="lblMessage" />
            </div>
        </div>
        <!-- Content Column | Start -->
        <div class="clear">
        </div>
    </div>
    <div class="seperator">
    </div>

    <script language="javascript" type="text/javascript">

        function SubmitConfirm() {
            var _retVal = false;
            if (Page_ClientValidate('applynow')) {
                _retVal = confirm('Do you confirm to SUBMIT?');
                if (_retVal) {
                    document.getElementById('<%=lblSubmitMessage.ClientID%>').innerHTML = 'Processing...';
                    document.getElementById('divProcessing').style.display = '';
                    //document.getElementById('<%=lblSubmitMessage.ClientID%>').style.color = 'gray';
                    document.getElementById('<%=btnSubmitForm.ClientID%>').style.display = 'none';
                }
            }
            return _retVal;
        }

//        $('#<%=tdQuestion.ClientID%>').bind('paste', function() {
//            var element = this;
//            setTimeout(function() {
//                var text = $(element).val();
//                //alert($('#<%=txtQuestion.ClientID%>').val());
//                // do something with text
//            }, 100);
//        });

//        $(document).ready(function() {
//            $('#<%=tdQuestion.ClientID%>').bind("paste", function(e) {
//                e.preventDefault(); //cut copy 
//            });
//        });

        function stripHTML() {
            var re = /(<([^>]+)>)/gi;
            for (i = 0; i < arguments.length; i++)
                arguments[i].value = arguments[i].value.replace(re, "")
        }       
        
    </script>

</asp:Content>
